package com.study.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.io.Serializable;

/**
 * 新闻动态实体类
 * (Newsinfo)实体类
 * @author makejava
 * @since 2022-09-21 11:23:28
 */
@Data
@TableName(value = "newsinfo")
public class Newsinfo implements Serializable {
    private static final long serialVersionUID = -20036089502642617L;
    @TableId(value = "news_id",type = IdType.NONE)
    private String newsId;
    @TableField(value = "news_content")
    private String newsContent;
    @TableField(value = "news_tetle")
    private String newsTetle;
    @TableField(value = "news_date")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date newsDate;
    @TableField(value = "news_imagepath")
    private String newsImagepath;
    @TableField(value = "news_auth")
    private String newsAuth;
    @TableField(value = "news_rate")
    private Integer newsRate;
    @TableField(value = "news_type")
    private Integer newsType;

    @TableField(exist = false)
    private Userinfo user;
}

